﻿using Super.Admin.Views.ShowDialog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Super.Admin.Utils
{
    public static class Growl
    {
        public static void Success(string message)
        {
            ShowAlert(message, AntdUI.TType.Success);
        }
        public static void Error(string message)
        {
            ShowAlert(message, AntdUI.TType.Error);
        }
        public static void Warning(string message)
        {
            ShowAlert(message, AntdUI.TType.Warn);
        }
        public static void Info(string message)
        {
            ShowAlert(message, AntdUI.TType.Info);
        }
        private static void ShowAlert(string message, AntdUI.TType type)
        {
            FrmAlert frmAlart = new FrmAlert();
            frmAlart.Alert.TextTitle = "Super.Admin";
            frmAlart.Alert.Text = message;
            frmAlart.Alert.Icon = type;
            frmAlart.Show();
        }
    }
}
